const Base = require('./base.js');
const moment = require('moment');

module.exports = class extends Base {
	/*验证配料编号*/
	async getNumberAction() {
		let strList = this.post('strList');
		
		for (const str of strList){
			const num = await this.model('material').where({mater: str.custom_value}).count();
			if(num<=0){
				return this.success({res:0,cname:str.custom_name});
			}
		}
		return this.success({res:1});
    }
};